//
//  BMSLifecycleManager.h
//  WDBMS
//
//  Created by YeJary on 2025/5/13.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface BMSLifecycleManager : NSObject

+ (instancetype)shared;

/// 启动监听
- (void)startMonitoring;

/// 当前是否活跃状态（前台）
@property (nonatomic, assign, readonly) BOOL isAppActive;

/// 是否第一次进入前台
@property (nonatomic, assign, readonly) BOOL hasEnteredForeground;

/// 自定义回调
@property (nonatomic, copy, nullable) void(^onDidBecomeActive)(void);
@property (nonatomic, copy, nullable) void(^onDidEnterBackground)(void);

- (void)WDApplication:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;

@end

NS_ASSUME_NONNULL_END
